// 分组和网站链接管理相关类型定义

// 从实体类导入类型
export { Group } from '../models/Group';
export { Website } from '../models/Website';

// 创建分组的请求参数
export interface CreateGroupRequest {
  name: string;
  description?: string;
  icon?: string;
  color?: string;
  order?: number;
}

// 更新分组的请求参数
export interface UpdateGroupRequest {
  name?: string;
  description?: string;
  icon?: string;
  color?: string;
  order?: number;
}

// 创建网站的请求参数
export interface CreateWebsiteRequest {
  name: string;
  description?: string;
  url: string;
  logo?: string;
  groupId: string;
  order?: number;
  isActive?: boolean;
}

// 更新网站的请求参数
export interface UpdateWebsiteRequest {
  name?: string;
  description?: string;
  url?: string;
  logo?: string;
  groupId?: string;
  order?: number;
  isActive?: boolean;
}

// 分组带网站列表的扩展接口
export interface GroupWithWebsites {
  id: string;
  name: string;
  description?: string;
  icon?: string;
  color?: string;
  order: number;
  createdAt: Date;
  updatedAt: Date;
  websites: {
    id: string;
    name: string;
    description?: string;
    url: string;
    logo?: string;
    groupId: string;
    order: number;
    isActive: boolean;
    createdAt: Date;
    updatedAt: Date;
  }[];
}

// API 响应格式
export interface ApiResponse<T> {
  success: boolean;
  message: string;
  data?: T;
}

// 分页查询参数
export interface PaginationQuery {
  page?: number;
  limit?: number;
  search?: string;
}

// 分页响应
export interface PaginatedResponse<T> {
  items: T[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
}